package net.jiastudy.biz.targettask.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import io.swagger.annotations.ApiModelProperty;
import net.jiastudy.biz.user.entity.User;
import net.jiastudy.core.base.BaseEntity;

public class TargetWork extends BaseEntity<TargetWork> {
    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "目标任务id")
    private Long targetTaskId;

    @ApiModelProperty(value = "所属部门id")
    private Long deptId;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "排序")
    private Integer seq;

    @ApiModelProperty(value = "负责人id")
    private Long responsibleUserId;

    @ApiModelProperty(value = "协助人id")
    private Long assistUserId;

    @ApiModelProperty(value = "开始日期")
    private String startDate;

    @ApiModelProperty(value = "结束日期")
    private String endDate;

    @ApiModelProperty(value = "记录创建人")
    private Long createdUserId;

    @ApiModelProperty(value = "负责人")
    @TableField(exist = false)
    private User responsibleUser;

    @ApiModelProperty(value = "协助人")
    @TableField(exist = false)
    private User assistUser;

    public User getResponsibleUser() {
        if (null != responsibleUserId) {
            User responsibleUser = new User();
            responsibleUser.setId(responsibleUserId);
            responsibleUser = responsibleUser.selectById();

            return responsibleUser;
        }

        return responsibleUser;
    }

    public User getAssistUser() {
        if (null != assistUserId) {
            User assistUser = new User();
            assistUser.setId(assistUserId);
            assistUser = assistUser.selectById();

            return assistUser;
        }

        return assistUser;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getTargetTaskId() {
        return targetTaskId;
    }

    public void setTargetTaskId(Long targetTaskId) {
        this.targetTaskId = targetTaskId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getSeq() {
        return seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    public Long getResponsibleUserId() {
        return responsibleUserId;
    }

    public void setResponsibleUserId(Long responsibleUserId) {
        this.responsibleUserId = responsibleUserId;
    }

    public Long getAssistUserId() {
        return assistUserId;
    }

    public void setAssistUserId(Long assistUserId) {
        this.assistUserId = assistUserId;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public Long getCreatedUserId() {
        return createdUserId;
    }

    public void setCreatedUserId(Long createdUserId) {
        this.createdUserId = createdUserId;
    }
}
